home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / ply15dat.zip / LENS.PI < prev    next >
Text File  |  1992-09-19  |  11KB  |  241 lines

  1. // File demonstrating refraction, CSG, etc.
  2. // Polyray input file: Alexander Enzmann
  3.  
  4. // Define the position of the eye based on the frame number
  5. define eye_x_pos 0
  6. define eye_height 4
  7. define eye_dist 10
  8.  
  9. viewpoint {
  10.    from <eye_x_pos,eye_height,-eye_dist>
  11.    at <0,0,0>
  12.    up <0,1,0>
  13.    angle 35
  14.    resolution 512, 512
  15.    }
  16.  
  17. background <0.196078, 0.6, 0.8>
  18. light <-10,10,-10>
  19. include "..\colors.inc"
  20.  
  21. // Make a convex lens by intersecting two spheres
  22. define convex_lens
  23. object {
  24.      object { sphere <0,0,-0.5>, 1 }
  25.    * object { sphere <0,0, 0.5>, 1 }
  26.    glass
  27.    }
  28.  
  29. // Put two lenses in line - with two lenses the magnified image
  30. // will end up right-side-up.
  31. convex_lens {
  32.    rotate <degrees(atan(eye_height/eye_dist)),0,0>
  33.    translate <0,eye_height/8,-eye_dist/8>
  34.    }
  35. convex_lens {
  36.    rotate <degrees(atan(eye_height/eye_dist)),0,0>
  37.    translate <0,eye_height/2,-eye_dist/2>
  38.    }
  39.  
  40. // Create a ground plane
  41. object {
  42.    polygon 4, <-30, -1.1, -10>, <-30, -1.1, 30>, 
  43.           < 30, -1.1,  30>, < 30, -1.1, -10>
  44.    texture { checker matte_white, matte_black }
  45.    translate <0,-1.1,0>
  46.    }
  47.  
  48. // Make a 13x13 grid of balls of variously colored balls
  49.  
  50. // How big are the balls?
  51. define ball_size 0.15
  52.  
  53. // Make a bunch of little colored balls on the ground
  54. define little_ball
  55.    object { sphere <0, -0.9, 0>, ball_size }
  56.  
  57. // Parameters on objects would be really great here - all
  58. // I want to change between each line of balls is their
  59. // color and their position
  60. little_ball { matte_red     translate <-3.0, 0,-3.0> }
  61. little_ball { matte_blue    translate <-3.0, 0,-2.5> }
  62. little_ball { matte_green   translate <-3.0, 0,-2.0> }
  63. little_ball { matte_cyan    translate <-3.0, 0,-1.5> }
  64. little_ball { matte_yellow  translate <-3.0, 0,-1.0> }
  65. little_ball { matte_magenta translate <-3.0, 0,-0.5> }
  66. little_ball { matte_red     translate <-3.0, 0, 0.0> }
  67. little_ball { matte_blue    translate <-3.0, 0, 0.5> }
  68. little_ball { matte_green   translate <-3.0, 0, 1.0> }
  69. little_ball { matte_cyan    translate <-3.0, 0, 1.5> }
  70. little_ball { matte_yellow  translate <-3.0, 0, 2.0> }
  71. little_ball { matte_magenta translate <-3.0, 0, 2.5> }
  72. little_ball { matte_white   translate <-3.0, 0, 3.0> }
  73.  
  74. little_ball { matte_blue    translate <-2.5, 0,-3.0> }
  75. little_ball { matte_green   translate <-2.5, 0,-2.5> }
  76. little_ball { matte_cyan    translate <-2.5, 0,-2.0> }
  77. little_ball { matte_yellow  translate <-2.5, 0,-1.5> }
  78. little_ball { matte_magenta translate <-2.5, 0,-1.0> }
  79. little_ball { matte_red     translate <-2.5, 0,-0.5> }
  80. little_ball { matte_blue    translate <-2.5, 0, 0.0> }
  81. little_ball { matte_green   translate <-2.5, 0, 0.5> }
  82. little_ball { matte_cyan    translate <-2.5, 0, 1.0> }
  83. little_ball { matte_yellow  translate <-2.5, 0, 1.5> }
  84. little_ball { matte_magenta translate <-2.5, 0, 2.0> }
  85. little_ball { matte_white   translate <-2.5, 0, 2.5> }
  86. little_ball { matte_red     translate <-2.5, 0, 3.0> }
  87.  
  88. little_ball { matte_green   translate <-2.0, 0,-3.0> }
  89. little_ball { matte_cyan    translate <-2.0, 0,-2.5> }
  90. little_ball { matte_yellow  translate <-2.0, 0,-2.0> }
  91. little_ball { matte_magenta translate <-2.0, 0,-1.5> }
  92. little_ball { matte_red     translate <-2.0, 0,-1.0> }
  93. little_ball { matte_blue    translate <-2.0, 0,-0.5> }
  94. little_ball { matte_green   translate <-2.0, 0, 0.0> }
  95. little_ball { matte_cyan    translate <-2.0, 0, 0.5> }
  96. little_ball { matte_yellow  translate <-2.0, 0, 1.0> }
  97. little_ball { matte_magenta translate <-2.0, 0, 1.5> }
  98. little_ball { matte_white   translate <-2.0, 0, 2.0> }
  99. little_ball { matte_red     translate <-2.0, 0, 2.5> }
  100. little_ball { matte_blue    translate <-2.0, 0, 3.0> }
  101.  
  102. little_ball { matte_cyan    translate <-1.5, 0,-3.0> }
  103. little_ball { matte_yellow  translate <-1.5, 0,-2.5> }
  104. little_ball { matte_magenta translate <-1.5, 0,-2.0> }
  105. little_ball { matte_red     translate <-1.5, 0,-1.5> }
  106. little_ball { matte_blue    translate <-1.5, 0,-1.0> }
  107. little_ball { matte_green   translate <-1.5, 0,-0.5> }
  108. little_ball { matte_cyan    translate <-1.5, 0, 0.0> }
  109. little_ball { matte_yellow  translate <-1.5, 0, 0.5> }
  110. little_ball { matte_magenta translate <-1.5, 0, 1.0> }
  111. little_ball { matte_white   translate <-1.5, 0, 1.5> }
  112. little_ball { matte_red     translate <-1.5, 0, 2.0> }
  113. little_ball { matte_blue    translate <-1.5, 0, 2.5> }
  114. little_ball { matte_green   translate <-1.5, 0, 3.0> }
  115.  
  116. little_ball { matte_yellow  translate <-1.0, 0,-3.0> }
  117. little_ball { matte_magenta translate <-1.0, 0,-2.5> }
  118. little_ball { matte_red     translate <-1.0, 0,-2.0> }
  119. little_ball { matte_blue    translate <-1.0, 0,-1.5> }
  120. little_ball { matte_green   translate <-1.0, 0,-1.0> }
  121. little_ball { matte_cyan    translate <-1.0, 0,-0.5> }
  122. little_ball { matte_yellow  translate <-1.0, 0, 0.0> }
  123. little_ball { matte_magenta translate <-1.0, 0, 0.5> }
  124. little_ball { matte_white   translate <-1.0, 0, 1.0> }
  125. little_ball { matte_red     translate <-1.0, 0, 1.5> }
  126. little_ball { matte_blue    translate <-1.0, 0, 2.0> }
  127. little_ball { matte_green   translate <-1.0, 0, 2.5> }
  128. little_ball { matte_cyan    translate <-1.0, 0, 3.0> }
  129.  
  130. little_ball { matte_magenta translate <-0.5, 0,-3.0> }
  131. little_ball { matte_red     translate <-0.5, 0,-2.5> }
  132. little_ball { matte_blue    translate <-0.5, 0,-2.0> }
  133. little_ball { matte_green   translate <-0.5, 0,-1.5> }
  134. little_ball { matte_cyan    translate <-0.5, 0,-1.0> }
  135. little_ball { matte_yellow  translate <-0.5, 0,-0.5> }
  136. little_ball { matte_magenta translate <-0.5, 0, 0.0> }
  137. little_ball { matte_white   translate <-0.5, 0, 0.5> }
  138. little_ball { matte_red     translate <-0.5, 0, 1.0> }
  139. little_ball { matte_blue    translate <-0.5, 0, 1.5> }
  140. little_ball { matte_green   translate <-0.5, 0, 2.0> }
  141. little_ball { matte_cyan    translate <-0.5, 0, 2.5> }
  142. little_ball { matte_yellow  translate <-0.5, 0, 3.0> }
  143.  
  144. little_ball { matte_red     translate < 0.0, 0,-3.0> }
  145. little_ball { matte_blue    translate < 0.0, 0,-2.5> }
  146. little_ball { matte_green   translate < 0.0, 0,-2.0> }
  147. little_ball { matte_cyan    translate < 0.0, 0,-1.5> }
  148. little_ball { matte_yellow  translate < 0.0, 0,-1.0> }
  149. little_ball { matte_magenta translate < 0.0, 0,-0.5> }
  150. little_ball { matte_white   translate < 0.0, 0, 0.0> }
  151. little_ball { matte_red     translate < 0.0, 0, 0.5> }
  152. little_ball { matte_blue    translate < 0.0, 0, 1.0> }
  153. little_ball { matte_green   translate < 0.0, 0, 1.5> }
  154. little_ball { matte_cyan    translate < 0.0, 0, 2.0> }
  155. little_ball { matte_yellow  translate < 0.0, 0, 2.5> }
  156. little_ball { matte_magenta translate < 0.0, 0, 3.0> }
  157.  
  158. little_ball { matte_blue    translate < 0.5, 0,-3.0> }
  159. little_ball { matte_green   translate < 0.5, 0,-2.5> }
  160. little_ball { matte_cyan    translate < 0.5, 0,-2.0> }
  161. little_ball { matte_yellow  translate < 0.5, 0,-1.5> }
  162. little_ball { matte_magenta translate < 0.5, 0,-1.0> }
  163. little_ball { matte_white   translate < 0.5, 0,-0.5> }
  164. little_ball { matte_red     translate < 0.5, 0, 0.0> }
  165. little_ball { matte_blue    translate < 0.5, 0, 0.5> }
  166. little_ball { matte_green   translate < 0.5, 0, 1.0> }
  167. little_ball { matte_cyan    translate < 0.5, 0, 1.5> }
  168. little_ball { matte_yellow  translate < 0.5, 0, 2.0> }
  169. little_ball { matte_magenta translate < 0.5, 0, 2.5> }
  170. little_ball { matte_red     translate < 0.5, 0, 3.0> }
  171.  
  172. little_ball { matte_green   translate < 1.0, 0,-3.0> }
  173. little_ball { matte_cyan    translate < 1.0, 0,-2.5> }
  174. little_ball { matte_yellow  translate < 1.0, 0,-2.0> }
  175. little_ball { matte_magenta translate < 1.0, 0,-1.5> }
  176. little_ball { matte_white   translate < 1.0, 0,-1.0> }
  177. little_ball { matte_red     translate < 1.0, 0,-0.5> }
  178. little_ball { matte_blue    translate < 1.0, 0, 0.0> }
  179. little_ball { matte_green   translate < 1.0, 0, 0.5> }
  180. little_ball { matte_cyan    translate < 1.0, 0, 1.0> }
  181. little_ball { matte_yellow  translate < 1.0, 0, 1.5> }
  182. little_ball { matte_magenta translate < 1.0, 0, 2.0> }
  183. little_ball { matte_red     translate < 1.0, 0, 2.5> }
  184. little_ball { matte_blue    translate < 1.0, 0, 3.0> }
  185.  
  186. little_ball { matte_cyan    translate < 1.5, 0,-3.0> }
  187. little_ball { matte_yellow  translate < 1.5, 0,-2.5> }
  188. little_ball { matte_magenta translate < 1.5, 0,-2.0> }
  189. little_ball { matte_white   translate < 1.5, 0,-1.5> }
  190. little_ball { matte_red     translate < 1.5, 0,-1.0> }
  191. little_ball { matte_blue    translate < 1.5, 0,-0.5> }
  192. little_ball { matte_green   translate < 1.5, 0, 0.0> }
  193. little_ball { matte_cyan    translate < 1.5, 0, 0.5> }
  194. little_ball { matte_yellow  translate < 1.5, 0, 1.0> }
  195. little_ball { matte_magenta translate < 1.5, 0, 1.5> }
  196. little_ball { matte_red     translate < 1.5, 0, 2.0> }
  197. little_ball { matte_blue    translate < 1.5, 0, 2.5> }
  198. little_ball { matte_green   translate < 1.5, 0, 3.0> }
  199.  
  200. little_ball { matte_yellow  translate < 2.0, 0,-3.0> }
  201. little_ball { matte_magenta translate < 2.0, 0,-2.5> }
  202. little_ball { matte_white   translate < 2.0, 0,-2.0> }
  203. little_ball { matte_red     translate < 2.0, 0,-1.5> }
  204. little_ball { matte_blue    translate < 2.0, 0,-1.0> }
  205. little_ball { matte_green   translate < 2.0, 0,-0.5> }
  206. little_ball { matte_cyan    translate < 2.0, 0, 0.0> }
  207. little_ball { matte_yellow  translate < 2.0, 0, 0.5> }
  208. little_ball { matte_magenta translate < 2.0, 0, 1.0> }
  209. little_ball { matte_red     translate < 2.0, 0, 1.5> }
  210. little_ball { matte_blue    translate < 2.0, 0, 2.0> }
  211. little_ball { matte_green   translate < 2.0, 0, 2.5> }
  212. little_ball { matte_cyan    translate < 2.0, 0, 3.0> }
  213.  
  214. little_ball { matte_magenta translate < 2.5, 0,-3.0> }
  215. little_ball { matte_white   translate < 2.5, 0,-2.5> }
  216. little_ball { matte_red     translate < 2.5, 0,-2.0> }
  217. little_ball { matte_blue    translate < 2.5, 0,-1.5> }
  218. little_ball { matte_green   translate < 2.5, 0,-1.0> }
  219. little_ball { matte_cyan    translate < 2.5, 0,-0.5> }
  220. little_ball { matte_yellow  translate < 2.5, 0, 0.0> }
  221. little_ball { matte_magenta translate < 2.5, 0, 0.5> }
  222. little_ball { matte_red     translate < 2.5, 0, 1.0> }
  223. little_ball { matte_blue    translate < 2.5, 0, 1.5> }
  224. little_ball { matte_green   translate < 2.5, 0, 2.0> }
  225. little_ball { matte_cyan    translate < 2.5, 0, 2.5> }
  226. little_ball { matte_yellow  translate < 2.5, 0, 3.0> }
  227.  
  228. little_ball { matte_white   translate < 3.0, 0,-3.0> }
  229. little_ball { matte_red     translate < 3.0, 0,-2.5> }
  230. little_ball { matte_blue    translate < 3.0, 0,-2.0> }
  231. little_ball { matte_green   translate < 3.0, 0,-1.5> }
  232. little_ball { matte_cyan    translate < 3.0, 0,-1.0> }
  233. little_ball { matte_yellow  translate < 3.0, 0,-0.5> }
  234. little_ball { matte_magenta translate < 3.0, 0, 0.0> }
  235. little_ball { matte_red     translate < 3.0, 0, 0.5> }
  236. little_ball { matte_blue    translate < 3.0, 0, 1.0> }
  237. little_ball { matte_green   translate < 3.0, 0, 1.5> }
  238. little_ball { matte_cyan    translate < 3.0, 0, 2.0> }
  239. little_ball { matte_yellow  translate < 3.0, 0, 2.5> }
  240. little_ball { matte_magenta translate < 3.0, 0, 3.0> }
  241.